package com.wl.configuration.filter;

import org.springframework.web.filter.OncePerRequestFilter;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class TestFilter2 implements Filter {

    public void init(FilterConfig filterConfig) throws ServletException {
        System.err.println("#############  in TestFilter2 init  #############");
    }

    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.err.println("############TestFilter2 doFilterInternal executed############");
        filterChain.doFilter(servletRequest, servletResponse);
        System.err.println("############TestFilter2 doFilter after############");
    }

    public void destroy() {
        System.err.println("#############  in TestFilter2 destroy  #############");
    }
}
